

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Mount CephFS on Windows &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/underscore.js"></script>
        <script src="../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="cephfs-shell – 与 CephFS 对话的类 shell 工具" href="../../man/8/cephfs-shell/" />
    <link rel="prev" title="用 FUSE 挂载 CephFS" href="../mount-using-fuse/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../">Ceph 文件系统</a> &raquo;</li>
        
      <li>Mount CephFS on Windows</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../_sources/cephfs/ceph-dokan.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../">
          

          
            
            <img src="../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 文件系统</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../#cephfs">CephFS 入门</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id4">管理</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../#id5">挂载 CephFS</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../client-config-ref/"> 客户端配置选项</a></li>
<li class="toctree-l3"><a class="reference internal" href="../client-auth/"> 客户端认证</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-prerequisites/"> 挂载 CephFS: 前提条件</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-using-kernel-driver/"> 用内核驱动挂载 CephFS 文件系统</a></li>
<li class="toctree-l3"><a class="reference internal" href="../mount-using-fuse/"> 用 FUSE 挂载 CephFS</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#"> 在 Windows 上挂载 CephFS</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#usage">Usage</a></li>
<li class="toctree-l4"><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/cephfs-shell/"> CephFS Shell 的用法</a></li>
<li class="toctree-l3"><a class="reference internal" href="../kernel-features/"> 内核驱动支持的功能</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/ceph-fuse/"> ceph-fuse 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/mount.ceph/"> mount.ceph 手册页</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../man/8/mount.fuse.ceph/"> mount.fuse.ceph 手册页</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../#id6">CephFS 内幕</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id7">故障排除和灾难恢复</a></li>
<li class="toctree-l2"><a class="reference internal" href="../#id9">更多细节</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="mount-cephfs-on-windows">
<span id="ceph-dokan"></span><h1>Mount CephFS on Windows<a class="headerlink" href="#mount-cephfs-on-windows" title="Permalink to this headline">¶</a></h1>
<p><code class="docutils literal notranslate"><span class="pre">ceph-dokan</span></code> can be used for mounting CephFS filesystems on Windows.
It leverages Dokany, a Windows driver that allows implementing filesystems in
userspace, pretty much like FUSE.</p>
<p>Please check the <a class="reference external" href="../../install/windows-install">installation guide</a> to get started.</p>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="section" id="mounting-filesystems">
<h3>Mounting filesystems<a class="headerlink" href="#mounting-filesystems" title="Permalink to this headline">¶</a></h3>
<p>In order to mount a ceph filesystem, the following command can be used:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span><span class="o">.</span><span class="n">exe</span> <span class="o">-</span><span class="n">c</span> <span class="n">c</span><span class="p">:</span>\<span class="n">ceph</span><span class="o">.</span><span class="n">conf</span> <span class="o">-</span><span class="n">l</span> <span class="n">x</span>
</pre></div>
</div>
<p>This will mount the default ceph filesystem using the drive letter <code class="docutils literal notranslate"><span class="pre">x</span></code>.
If <code class="docutils literal notranslate"><span class="pre">ceph.conf</span></code> is placed at the default location, which is
<code class="docutils literal notranslate"><span class="pre">%ProgramData%\ceph\ceph.conf</span></code>, then this argument becomes optional.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">-l</span></code> argument also allows using an empty folder as a mountpoint
instead of a drive letter.</p>
<p>The uid and gid used for mounting the filesystem default to 0 and may be
changed using the following <code class="docutils literal notranslate"><span class="pre">ceph.conf</span></code> options:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">client</span><span class="p">]</span>
<span class="c1"># client_permissions = true</span>
<span class="n">client_mount_uid</span> <span class="o">=</span> <span class="mi">1000</span>
<span class="n">client_mount_gid</span> <span class="o">=</span> <span class="mi">1000</span>
</pre></div>
</div>
<p>If you have more than one FS on your Ceph cluster, use the option
<code class="docutils literal notranslate"><span class="pre">--client_fs</span></code> to mount the non-default FS:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="o">-</span><span class="n">Force</span> <span class="n">C</span><span class="p">:</span>\<span class="n">mnt</span>\<span class="n">mycephfs2</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span><span class="o">.</span><span class="n">exe</span> <span class="o">--</span><span class="n">mountpoint</span> <span class="n">C</span><span class="p">:</span>\<span class="n">mnt</span>\<span class="n">mycephfs2</span> <span class="o">--</span><span class="n">client_fs</span> <span class="n">mycephfs2</span>
</pre></div>
</div>
<p>CephFS subdirectories can be mounted using the <code class="docutils literal notranslate"><span class="pre">--root-path</span></code> parameter:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span> <span class="o">-</span><span class="n">l</span> <span class="n">y</span> <span class="o">--</span><span class="n">root</span><span class="o">-</span><span class="n">path</span> <span class="o">/</span><span class="n">a</span>
</pre></div>
</div>
<p>If the <code class="docutils literal notranslate"><span class="pre">-o</span> <span class="pre">--removable</span></code> flags are set, the mounts will show up in the
<code class="docutils literal notranslate"><span class="pre">Get-Volume</span></code> results:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>PS C:\&gt; Get-Volume -FriendlyName &quot;Ceph*&quot; | `
        Select-Object -Property @(&quot;DriveLetter&quot;, &quot;Filesystem&quot;, &quot;FilesystemLabel&quot;)

DriveLetter Filesystem FilesystemLabel
----------- ---------- ---------------
          Z Ceph       Ceph
          W Ceph       Ceph - new_fs
</pre></div>
</div>
<p>Please use <code class="docutils literal notranslate"><span class="pre">ceph-dokan</span> <span class="pre">--help</span></code> for a full list of arguments.</p>
</div>
<div class="section" id="credentials">
<h3>Credentials<a class="headerlink" href="#credentials" title="Permalink to this headline">¶</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">--id</span></code> option passes the name of the CephX user whose keyring we intend to
use for mounting CephFS. The following commands are equivalent:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span> <span class="o">--</span><span class="nb">id</span> <span class="n">foo</span> <span class="o">-</span><span class="n">l</span> <span class="n">x</span>
<span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span> <span class="o">--</span><span class="n">name</span> <span class="n">client</span><span class="o">.</span><span class="n">foo</span> <span class="o">-</span><span class="n">l</span> <span class="n">x</span>
</pre></div>
</div>
</div>
<div class="section" id="unmounting-filesystems">
<h3>Unmounting filesystems<a class="headerlink" href="#unmounting-filesystems" title="Permalink to this headline">¶</a></h3>
<p>The mount can be removed by either issuing ctrl-c or using the unmap command,
like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ceph</span><span class="o">-</span><span class="n">dokan</span><span class="o">.</span><span class="n">exe</span> <span class="n">unmap</span> <span class="o">-</span><span class="n">l</span> <span class="n">x</span>
</pre></div>
</div>
<p>Note that when unmapping Ceph filesystems, the exact same mountpoint argument
must be used as when the mapping was created.</p>
</div>
<div class="section" id="limitations">
<h3>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline">¶</a></h3>
<p>Be aware that Windows ACLs are ignored. Posix ACLs are supported but cannot be
modified using the current CLI. In the future, we may add some command actions
to change file ownership or permissions.</p>
<p>Another thing to note is that cephfs doesn’t support mandatory file locks, which
Windows is heavily rely upon. At the moment, we’re letting Dokan handle file
locks, which are only enforced locally.</p>
<p>Unlike <code class="docutils literal notranslate"><span class="pre">rbd-wnbd</span></code>, <code class="docutils literal notranslate"><span class="pre">ceph-dokan</span></code> doesn’t currently provide a <code class="docutils literal notranslate"><span class="pre">service</span></code>
command. In order for the cephfs mount to survive host reboots, consider using
<code class="docutils literal notranslate"><span class="pre">NSSM</span></code>.</p>
</div>
</div>
<div class="section" id="troubleshooting">
<h2>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h2>
<p>Please consult the <a class="reference external" href="../../install/windows-troubleshooting">Windows troubleshooting</a> page.</p>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../../man/8/cephfs-shell/" class="btn btn-neutral float-right" title="cephfs-shell – 与 CephFS 对话的类 shell 工具" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../mount-using-fuse/" class="btn btn-neutral float-left" title="用 FUSE 挂载 CephFS" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>